Trees | Indices | Toggle frames |
---|
OpenGL context for drawing.
Windows in pyglet each have their own GL context. This class boxes the context in a platform-independent manner. Applications will have no need to deal with contexts directly.
__init__(self, context_share=None) | |
__repr__(self) | |
set_current(self) | |
destroy(self)
Release the context.
|
|
delete_texture(self,
texture_id)
Safely delete a texture belonging to this context.
|
|
delete_buffer(self,
buffer_id)
Safely delete a buffer object belonging to this context.
|
ObjectSpace |
object_space
An object which is shared between all contexts that share
GL objects.
|
CONTEXT_SHARE_NONE = None
|
|
CONTEXT_SHARE_EXISTING = 1
|
Release the context.
The context will not be usable after being destroyed. Each platform has its own convention for releasing the context and the buffer(s) that depend on it in the correct order; this should never be called by an application.
Safely delete a texture belonging to this context.
Usually, the texture is released immediately using glDeleteTextures, however if another context that does not share this context's object space is currently active, the deletion will be deferred until an appropriate context is activated.
Safely delete a buffer object belonging to this context.
This method behaves similarly to delete_texture, though for glDeleteBuffers instead of glDeleteTextures.
Since: pyglet 1.1
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:18 2009 | http://epydoc.sourceforge.net |